package com.xiaoyu.awakening.ai.index.api;

import com.xiaoyu.awakening.ai.index.entity.req.AwkIndexTaskReq;
import com.xiaoyu.awakening.ai.index.entity.res.AwkIndexTaskStatusDTO;
import com.xiaoyu.awakening.common.core.dto.Result;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.web.bind.annotation.*;

/**
 * 检索
 *
 * @author wangxiaoyu
 * @since v1.0
 */
@RequestMapping("/api/v1/task")
@Schema(name = "数据离线索引")
public interface IAwkIndexTaskControllerApi {
    @PostMapping(value = "/commit")
    Result<AwkIndexTaskStatusDTO> commitTask(@RequestBody AwkIndexTaskReq awkIndexTaskReq);

    @GetMapping(value = "/status/{taskId}")
    Result<AwkIndexTaskStatusDTO> taskStatus(@PathVariable("taskId") String taskId);

    @GetMapping(value = "/pause/{taskId}")
    Result<AwkIndexTaskStatusDTO> pause(@PathVariable("taskId") String taskId);

    @GetMapping(value = "/pause-all")
    Result<AwkIndexTaskStatusDTO> pauseAll();

    @GetMapping(value = "/resume-all")
    Result<AwkIndexTaskStatusDTO> resume();
}
